#!/usr/bin/env python

import os, sys


# add self to search path for testing
if __name__ == '__main__':
    exe_path = os.path.split(os.path.abspath(sys.argv[0]))[0]
    sys.path.append(os.path.abspath(os.path.join(exe_path, "python_modules")))
    myname = os.path.split(sys.argv[0])[1]
    myname = os.path.splitext(myname)[0];
else:
    myname = __name__

    
import re    
key_value = re.compile('([A-Z_]+)\s*=\s*(.+)\s*')
from collections import defaultdict 

def parse_smart_output (stream):

    protein_features = set(('SMART_PROTEIN_ID',  'NUMBER_OF_FEATURES_FOUND'))
    domain_features  = set(('START', 'END', 'EVALUE', 'TYPE', 'STATUS'))
    
    prot_domains = defaultdict(dict)
    curr_domain_name = None
    curr_protein = None
    for line in stream:
        line = line.strip()

        #ignore empty line or comment
        if len(line) == 0 or line[0:2] == '--':
            continue
            
        if line[0:9] == 'NO_MATCH:':
            prot_domains["_NO_MATCH"] = map(lambda x: x.strip(),  line[9:].split(","))
            continue

                        
        m = key_value.match(line)
        if not m:
            raise Exception("oops: ill formed line. ", line)
    
        key, value = m.groups()
        #sys.stderr.write("[%s],[%s]\n" % (key, value))
        if key == 'USER_PROTEIN_ID':
            curr_protein = value
            prot_domains[curr_protein]["_EXTRA"] = dict()
            continue
            

        # new domain add current to current protein
        elif key == 'DOMAIN':
            #
            # 
            curr_domain_name = value
            prot_domains[curr_protein][curr_domain_name] = list()
            prot_domains[curr_protein][curr_domain_name].append(dict())
            continue
        elif key in domain_features:
            prot_domains[curr_protein][curr_domain_name][-1][key] = value
        elif key in protein_features:
            prot_domains[curr_protein]["_EXTRA"][key] = value
        else:
            prot_domains[key] = value

    return prot_domains
        
if __name__ == '__main__':
    test_data = \
"""
NO_MATCH: ENSG00000152784|ENST00000282699, ENSG00000061455|ENST00000261364, ENSG00000164256|ENST00000253473, ENSG00000057657|ENST00000369096, ENSG00000112238|ENST00000359773, ENSG00000141956|ENST00000380489, ENSG00000116731|ENST00000400800, ENSG00000170325|ENST00000358825, ENSG00000116731|ENST00000407521, ENSG00000116731|ENST00000400802, ENSG00000061455|ENST00000407847, ENSG00000116731|ENST00000400803
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000141956|ENST00000398548
SMART_PROTEIN_ID = uniprot|UPI0000D74C4C|UPI0000D74C4C
NUMBER_OF_FEATURES_FOUND=33

DOMAIN=SET
START=86
END=202
EVALUE=0.10952684797013
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=234
END=256
EVALUE=3.23730701882901
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=409
END=431
EVALUE=0.0001604943099842
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=409
END=431
EVALUE=1.7e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=436
END=459
EVALUE=0.00589950546566824
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=436
END=459
EVALUE=0.0013
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=470
END=490
EVALUE=270.320796178783
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=497
END=519
EVALUE=0.0542140089627043
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=497
END=519
EVALUE=0.00025
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=524
END=546
EVALUE=0.0135535040925657
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=524
END=546
EVALUE=0.0024
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=573
END=595
EVALUE=0.0622755412330639
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=573
END=595
EVALUE=0.028
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=600
END=622
EVALUE=0.00275221664717456
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=600
END=622
EVALUE=0.0028
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=663
END=686
EVALUE=0.216855918058524
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=663
END=686
EVALUE=0.26
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=691
END=713
EVALUE=0.101166902049035
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=691
END=713
EVALUE=0.016
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=727
END=749
EVALUE=0.00137610833066917
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=727
END=749
EVALUE=0.00027
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=755
END=777
EVALUE=5.67433075331226e-05
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=755
END=777
EVALUE=2.2e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=783
END=805
EVALUE=0.0311377738653738
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=783
END=805
EVALUE=0.0066
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=811
END=833
EVALUE=0.0471960371502188
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=811
END=833
EVALUE=0.014
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=839
END=861
EVALUE=0.00479188747030009
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=839
END=861
EVALUE=0.00069
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=867
END=890
EVALUE=0.00479188747030009
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=867
END=890
EVALUE=0.011
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=896
END=919
EVALUE=0.0505834595805725
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=896
END=919
EVALUE=0.11
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000112238|ENST00000369215
SMART_PROTEIN_ID = uniprot|Q5TGC2|Q5TGC2_HUMAN
NUMBER_OF_FEATURES_FOUND=9

DOMAIN=SET
START=2
END=118
EVALUE=1.84227113980985
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=137
END=159
EVALUE=0.0333726394609194
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=137
END=159
EVALUE=0.00025
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=573
END=595
EVALUE=0.0440354601972752
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=573
END=595
EVALUE=0.0007
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=601
END=623
EVALUE=0.0191675489413791
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=601
END=623
EVALUE=0.00038
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=630
END=653
EVALUE=0.000279436823689187
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=630
END=653
EVALUE=0.00012
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000170325|ENST00000304538
SMART_PROTEIN_ID = uniprot|Q863Z2|Q863Z2_HUMAN
NUMBER_OF_FEATURES_FOUND=18

DOMAIN=ZnF_C2H2
START=269
END=291
EVALUE=0.0542140089627043
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=269
END=291
EVALUE=0.0037
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=440
END=462
EVALUE=0.00778444408094997
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=440
END=462
EVALUE=0.00038
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=470
END=492
EVALUE=0.00181578582533093
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=470
END=492
EVALUE=0.0024
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=498
END=520
EVALUE=0.0383350954123443
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=498
END=520
EVALUE=0.22
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=526
END=549
EVALUE=0.00834316057055673
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=526
END=549
EVALUE=0.0098
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=554
END=576
EVALUE=0.000320988619616965
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=554
END=576
EVALUE=1.7e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=582
END=605
EVALUE=0.000368719099226829
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=582
END=605
EVALUE=0.00051
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=637
END=660
EVALUE=0.0821730638369312
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=682
END=705
EVALUE=0.116210248124388
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=682
END=705
EVALUE=0.0086
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=744
END=767
EVALUE=0.124551056545143
TYPE=SMART
STATUS=visible|OK

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000142611|ENST00000378391
SMART_PROTEIN_ID = uniprot|Q5VU52|Q5VU52_HUMAN
NUMBER_OF_FEATURES_FOUND=21

DOMAIN=SET
START=84
END=217
EVALUE=0.0010610732637909
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=230
END=250
EVALUE=8.74914732464426
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=230
END=253
EVALUE=0.18
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=281
END=303
EVALUE=0.00137610833066917
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=281
END=303
EVALUE=0.00016
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=309
END=331
EVALUE=0.0001604943099842
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=309
END=331
EVALUE=2.5e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=337
END=360
EVALUE=0.000395183345624618
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=337
END=360
EVALUE=1.7e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=366
END=388
EVALUE=0.00194611106028498
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=366
END=388
EVALUE=1.7e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=394
END=416
EVALUE=0.0821730638369312
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=394
END=416
EVALUE=0.00085
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=423
END=450
EVALUE=9.96341339743095
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=423
END=445
EVALUE=0.00015
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=951
END=973
EVALUE=5.29433779809576e-05
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=951
END=973
EVALUE=4.6e-07
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=979
END=1002
EVALUE=0.0001604943099842
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=979
END=1002
EVALUE=6.7e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1008
END=1030
EVALUE=0.00726314316132557
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1008
END=1030
EVALUE=0.0011
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000138738|ENST00000394435
SMART_PROTEIN_ID = uniprot|Q6NXQ7|Q6NXQ7_HUMAN
NUMBER_OF_FEATURES_FOUND=0

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000142611|ENST00000378398
SMART_PROTEIN_ID = uniprot|Q5VU53|Q5VU53_HUMAN
NUMBER_OF_FEATURES_FOUND=21

DOMAIN=SET
START=84
END=218
EVALUE=0.0128662898135882
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=231
END=251
EVALUE=8.74914732464426
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=231
END=254
EVALUE=0.18
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=282
END=304
EVALUE=0.00137610833066917
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=282
END=304
EVALUE=0.00016
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=310
END=332
EVALUE=0.0001604943099842
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=310
END=332
EVALUE=2.5e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=338
END=361
EVALUE=0.000395183345624618
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=338
END=361
EVALUE=1.7e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=367
END=389
EVALUE=0.00194611106028498
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=367
END=389
EVALUE=1.7e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=395
END=417
EVALUE=0.0821730638369312
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=395
END=417
EVALUE=0.00085
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=424
END=451
EVALUE=9.96341339743095
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=424
END=446
EVALUE=0.00015
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=951
END=973
EVALUE=5.29433779809576e-05
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=951
END=973
EVALUE=4.6e-07
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=979
END=1002
EVALUE=0.0001604943099842
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=979
END=1002
EVALUE=6.7e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1008
END=1030
EVALUE=0.00726314316132557
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1008
END=1030
EVALUE=0.0011
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000164256|ENST00000296682
SMART_PROTEIN_ID = uniprot|Q27Q50|Q27Q50_HUMAN
NUMBER_OF_FEATURES_FOUND=30

DOMAIN=KRAB
START=26
END=85
EVALUE=5.37542321531334e-06
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:KRAB
START=27
END=65
EVALUE=6.9e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=Pfam:SSXRD
START=170
END=202
EVALUE=2.3e-14
TYPE=PFAM
STATUS=visible|OK

DOMAIN=SET
START=244
END=364
EVALUE=0.0406088928108206
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=388
END=411
EVALUE=6.24043647393669
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=524
END=546
EVALUE=14.7141307338982
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=552
END=574
EVALUE=0.000598985943164142
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=552
END=574
EVALUE=1.1e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=580
END=602
EVALUE=0.00169418808138012
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=580
END=602
EVALUE=3.9e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=608
END=630
EVALUE=0.00158073337448232
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=608
END=630
EVALUE=1.1e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=636
END=658
EVALUE=0.00158073337448232
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=636
END=658
EVALUE=1.1e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=664
END=686
EVALUE=0.00169418808138012
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=664
END=686
EVALUE=3.9e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=692
END=714
EVALUE=0.00169418808138012
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=692
END=714
EVALUE=3.9e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=720
END=742
EVALUE=9.21797749948973e-05
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=720
END=742
EVALUE=9.7e-07
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=748
END=770
EVALUE=0.000139718411987889
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=748
END=770
EVALUE=9.9e-07
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=776
END=798
EVALUE=0.000226973229749532
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=776
END=798
EVALUE=8.4e-07
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=804
END=826
EVALUE=9.21797749948973e-05
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=804
END=826
EVALUE=9.7e-07
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=832
END=854
EVALUE=0.000121631942279851
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=832
END=854
EVALUE=1.6e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=860
END=882
EVALUE=0.000737438197134504
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=860
END=882
EVALUE=2.3e-05
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000126856|ENST00000407825
SMART_PROTEIN_ID = uniprot|Q08EM4|Q08EM4_HUMAN
NUMBER_OF_FEATURES_FOUND=0

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000147596|ENST00000276594
SMART_PROTEIN_ID = uniprot|Q9GZV8|PRD14_HUMAN
NUMBER_OF_FEATURES_FOUND=13

DOMAIN=SET
START=251
END=373
EVALUE=0.000132634158808084
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=400
END=420
EVALUE=31.2675437807861
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=400
END=424
EVALUE=0.06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=432
END=455
EVALUE=0.0155688877492563
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=432
END=455
EVALUE=0.031
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=461
END=483
EVALUE=0.000344027084235941
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=461
END=483
EVALUE=3.4e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=489
END=511
EVALUE=0.0271070069454787
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=489
END=511
EVALUE=0.0082
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=517
END=540
EVALUE=0.00447098910655395
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=517
END=540
EVALUE=0.059
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=546
END=568
EVALUE=0.0542140089627043
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=546
END=568
EVALUE=0.00082
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000112238|ENST00000369214
SMART_PROTEIN_ID = uniprot|Q9H4Q3|PRD13_HUMAN
NUMBER_OF_FEATURES_FOUND=9

DOMAIN=SET
START=2
END=128
EVALUE=2.63856642471228
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=147
END=169
EVALUE=0.0333726394609194
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=147
END=169
EVALUE=0.00025
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=583
END=605
EVALUE=0.0440354601972752
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=583
END=605
EVALUE=0.0007
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=611
END=633
EVALUE=0.0191675489413791
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=611
END=633
EVALUE=0.00038
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=640
END=663
EVALUE=0.000279436823689187
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=640
END=663
EVALUE=0.00012
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000142611|ENST00000408992
SMART_PROTEIN_ID = uniprot|UPI000020399F|UPI000020399F
NUMBER_OF_FEATURES_FOUND=21

DOMAIN=SET
START=84
END=217
EVALUE=0.0010610732637909
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=230
END=250
EVALUE=8.74914732464426
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=230
END=253
EVALUE=0.18
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=281
END=303
EVALUE=0.00137610833066917
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=281
END=303
EVALUE=0.00016
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=309
END=331
EVALUE=0.0001604943099842
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=309
END=331
EVALUE=2.5e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=337
END=360
EVALUE=0.000395183345624618
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=337
END=360
EVALUE=1.7e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=366
END=388
EVALUE=0.00194611106028498
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=366
END=388
EVALUE=1.7e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=394
END=416
EVALUE=0.0821730638369312
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=394
END=416
EVALUE=0.00085
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=423
END=450
EVALUE=9.96341339743095
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=423
END=445
EVALUE=0.00015
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=950
END=972
EVALUE=5.29433779809576e-05
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=950
END=972
EVALUE=4.6e-07
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=978
END=1001
EVALUE=0.0001604943099842
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=978
END=1001
EVALUE=6.7e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1007
END=1029
EVALUE=0.00726314316132557
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1007
END=1029
EVALUE=0.0011
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000141956|ENST00000269844
SMART_PROTEIN_ID = uniprot|P57071|PRD15_HUMAN
NUMBER_OF_FEATURES_FOUND=33

DOMAIN=SET
START=415
END=531
EVALUE=0.10952684797013
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=563
END=585
EVALUE=3.23730701882901
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=738
END=760
EVALUE=0.0001604943099842
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=738
END=760
EVALUE=1.7e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=765
END=788
EVALUE=0.00589950546566824
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=765
END=788
EVALUE=0.0013
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=799
END=819
EVALUE=270.320796178783
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=826
END=848
EVALUE=0.0542140089627043
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=826
END=848
EVALUE=0.00025
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=853
END=875
EVALUE=0.0135535040925657
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=853
END=875
EVALUE=0.0024
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=902
END=924
EVALUE=0.0622755412330639
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=902
END=924
EVALUE=0.028
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=929
END=951
EVALUE=0.00275221664717456
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=929
END=951
EVALUE=0.0028
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=992
END=1015
EVALUE=0.216855918058524
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=992
END=1015
EVALUE=0.26
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1020
END=1042
EVALUE=0.101166902049035
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1020
END=1042
EVALUE=0.016
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1056
END=1078
EVALUE=0.00137610833066917
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1056
END=1078
EVALUE=0.00027
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1084
END=1106
EVALUE=5.67433075331226e-05
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1084
END=1106
EVALUE=2.2e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1112
END=1134
EVALUE=0.0311377738653738
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1112
END=1134
EVALUE=0.0066
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1140
END=1162
EVALUE=0.0471960371502188
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1140
END=1162
EVALUE=0.014
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1168
END=1190
EVALUE=0.00479188747030009
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1168
END=1190
EVALUE=0.00069
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1196
END=1219
EVALUE=0.00479188747030009
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1196
END=1219
EVALUE=0.011
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1225
END=1248
EVALUE=0.0505834595805725
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1225
END=1248
EVALUE=0.11
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000057657|ENST00000369091
SMART_PROTEIN_ID = uniprot|O75626|PRDM1_HUMAN
NUMBER_OF_FEATURES_FOUND=11

DOMAIN=Pfam:SET
START=41
END=171
EVALUE=9.4e-18
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=SET
START=50
END=171
EVALUE=4.93194986026956e-22
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=539
END=561
EVALUE=0.000641977238187666
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=539
END=561
EVALUE=1.9e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=567
END=589
EVALUE=0.00389222209314515
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=567
END=589
EVALUE=0.0002
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=595
END=617
EVALUE=0.00726314316132557
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=595
END=617
EVALUE=0.00012
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=623
END=645
EVALUE=0.0135535040925657
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=623
END=645
EVALUE=0.0087
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=651
END=671
EVALUE=127.236563561911
TYPE=SMART
STATUS=visible|OK

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000019485|ENST00000263765
SMART_PROTEIN_ID = uniprot|UPI000013D45B|UPI000013D45B
NUMBER_OF_FEATURES_FOUND=1

DOMAIN=SET
START=149
END=266
EVALUE=0.0833013013337702
TYPE=SMART
STATUS=visible|OK

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000116731|ENST00000376048
SMART_PROTEIN_ID = uniprot|Q5VUM0|Q5VUM0_HUMAN
NUMBER_OF_FEATURES_FOUND=2

DOMAIN=Pfam:SET
START=22
END=147
EVALUE=1.1e-07
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=SET
START=28
END=147
EVALUE=5.75208992528071e-23
TYPE=SMART
STATUS=visible|OK

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000142611|ENST00000378389
SMART_PROTEIN_ID = uniprot|Q5VU54|Q5VU54_HUMAN
NUMBER_OF_FEATURES_FOUND=21

DOMAIN=SET
START=84
END=217
EVALUE=0.0010610732637909
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=230
END=250
EVALUE=8.74914732464426
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=230
END=253
EVALUE=0.18
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=281
END=303
EVALUE=0.00137610833066917
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=281
END=303
EVALUE=0.00016
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=309
END=331
EVALUE=0.0001604943099842
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=309
END=331
EVALUE=2.5e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=337
END=360
EVALUE=0.000395183345624618
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=337
END=360
EVALUE=1.7e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=366
END=388
EVALUE=0.00194611106028498
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=366
END=388
EVALUE=1.7e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=394
END=416
EVALUE=0.0821730638369312
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=394
END=416
EVALUE=0.00085
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=423
END=450
EVALUE=9.96341339743095
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=423
END=445
EVALUE=0.00015
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=951
END=973
EVALUE=5.29433779809576e-05
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=951
END=973
EVALUE=4.6e-07
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=979
END=1002
EVALUE=0.0001604943099842
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=979
END=1002
EVALUE=6.7e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1008
END=1030
EVALUE=0.00726314316132557
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1008
END=1030
EVALUE=0.0011
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000152784|ENST00000339711
SMART_PROTEIN_ID = ensembl|ENSP00000339764|ENSP00000339764
NUMBER_OF_FEATURES_FOUND=5

DOMAIN=SET
START=20
END=137
EVALUE=1.60664300251925
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=155
END=183
EVALUE=237.388681811514
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=625
END=647
EVALUE=9.21600520752326
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=666
END=688
EVALUE=0.00119797188326593
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=666
END=688
EVALUE=0.00041
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000170325|ENST00000360871
SMART_PROTEIN_ID = uniprot|UPI00002371B4|UPI00002371B4
NUMBER_OF_FEATURES_FOUND=18

DOMAIN=ZnF_C2H2
START=355
END=377
EVALUE=0.0542140089627043
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=355
END=377
EVALUE=0.0037
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=526
END=548
EVALUE=0.00778444408094997
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=526
END=548
EVALUE=0.00038
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=556
END=578
EVALUE=0.00181578582533093
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=556
END=578
EVALUE=0.0024
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=584
END=606
EVALUE=0.0383350954123443
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=584
END=606
EVALUE=0.22
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=612
END=635
EVALUE=0.00834316057055673
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=612
END=635
EVALUE=0.0098
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=640
END=662
EVALUE=0.000320988619616965
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=640
END=662
EVALUE=1.7e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=668
END=691
EVALUE=0.000368719099226829
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=668
END=691
EVALUE=0.00051
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=723
END=746
EVALUE=0.0821730638369312
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=768
END=791
EVALUE=0.116210248124388
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=768
END=791
EVALUE=0.0086
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=830
END=853
EVALUE=0.124551056545143
TYPE=SMART
STATUS=visible|OK

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000110851|ENST00000228437
SMART_PROTEIN_ID = uniprot|Q9UKN5|PRDM4_HUMAN
NUMBER_OF_FEATURES_FOUND=14

DOMAIN=SET
START=412
END=535
EVALUE=0.867891254136409
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=545
END=566
EVALUE=83.950774800527
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=590
END=612
EVALUE=0.377567880833906
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=590
END=612
EVALUE=0.14
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=618
END=640
EVALUE=0.000226973229749532
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=618
END=640
EVALUE=7.5e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=646
END=668
EVALUE=8.02471550584961e-05
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=646
END=668
EVALUE=5.7e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=674
END=696
EVALUE=0.003631571626651
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=674
END=696
EVALUE=0.0022
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=702
END=724
EVALUE=0.0311377738653738
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=702
END=724
EVALUE=0.0031
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=730
END=750
EVALUE=18.1151288768658
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=730
END=752
EVALUE=0.0009
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000116731|ENST00000343137
SMART_PROTEIN_ID = uniprot|Q5THJ1|Q5THJ1_HUMAN
NUMBER_OF_FEATURES_FOUND=14

DOMAIN=coiled_coil_region
START=52
END=95
EVALUE=0
TYPE=INTRINSIC
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=159
END=181
EVALUE=0.00275221664717456
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=159
END=181
EVALUE=0.00054
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=189
END=211
EVALUE=0.00181578582533093
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=189
END=211
EVALUE=0.00022
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=282
END=305
EVALUE=0.00417158034561285
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=282
END=305
EVALUE=0.0015
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=933
END=955
EVALUE=0.153340322702918
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=961
END=984
EVALUE=0.266980907371989
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=990
END=1013
EVALUE=0.0471960371502188
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=990
END=1013
EVALUE=0.0083
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1132
END=1152
EVALUE=79.6985586079286
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=1254
END=1274
EVALUE=18.1151288768658
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1254
END=1277
EVALUE=0.054
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000138738|ENST00000264808
SMART_PROTEIN_ID = uniprot|UPI000013D572|UPI000013D572
NUMBER_OF_FEATURES_FOUND=34

DOMAIN=Pfam:SET
START=4
END=131
EVALUE=1.8e-12
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=SET
START=8
END=130
EVALUE=6.18760230461877e-05
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=167
END=190
EVALUE=0.0110088662734251
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=167
END=190
EVALUE=0.45
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=199
END=219
EVALUE=6.92419215000146
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=199
END=221
EVALUE=0.00053
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=234
END=254
EVALUE=10.2257841270994
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=234
END=256
EVALUE=0.00094
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=262
END=287
EVALUE=0.0135535040925657
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=262
END=287
EVALUE=0.00085
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=295
END=317
EVALUE=0.000737438197134504
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=295
END=317
EVALUE=0.0027
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=320
END=342
EVALUE=0.00316146673053867
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=320
END=342
EVALUE=0.0049
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=348
END=370
EVALUE=0.0880709074196118
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=348
END=370
EVALUE=0.0078
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=376
END=398
EVALUE=0.00208579018847401
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=376
END=398
EVALUE=0.0011
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=404
END=426
EVALUE=0.00158073337448232
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=404
END=426
EVALUE=0.00055
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=432
END=455
EVALUE=0.00119797188326593
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=432
END=455
EVALUE=0.00015
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=461
END=483
EVALUE=0.000486527767982855
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=461
END=483
EVALUE=2.1e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=489
END=511
EVALUE=0.00316146673053867
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=489
END=511
EVALUE=0.00022
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=517
END=539
EVALUE=0.000243263884324872
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=517
END=539
EVALUE=1.8e-06
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=545
END=567
EVALUE=0.000344027084235941
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=545
END=567
EVALUE=0.0001
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=573
END=595
EVALUE=0.0145262859628793
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=573
END=595
EVALUE=0.00057
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=602
END=625
EVALUE=0.0581051353471373
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=602
END=625
EVALUE=0.01
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000116731|ENST00000311066
SMART_PROTEIN_ID = uniprot|Q13029-2|Q13029-2
NUMBER_OF_FEATURES_FOUND=16

DOMAIN=Pfam:SET
START=22
END=147
EVALUE=1.1e-07
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=SET
START=28
END=147
EVALUE=5.75208992528071e-23
TYPE=SMART
STATUS=visible|OK

DOMAIN=coiled_coil_region
START=253
END=296
EVALUE=0
TYPE=INTRINSIC
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=360
END=382
EVALUE=0.00275221664717456
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=360
END=382
EVALUE=0.00054
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=390
END=412
EVALUE=0.00181578582533093
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=390
END=412
EVALUE=0.00022
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=483
END=506
EVALUE=0.00417158034561285
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=483
END=506
EVALUE=0.0015
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1134
END=1156
EVALUE=0.153340322702918
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=1162
END=1185
EVALUE=0.266980907371989
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=1191
END=1214
EVALUE=0.0471960371502188
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1191
END=1214
EVALUE=0.0083
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1333
END=1353
EVALUE=79.6985586079286
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=1455
END=1475
EVALUE=18.1151288768658
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1455
END=1478
EVALUE=0.054
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000116731|ENST00000235372
SMART_PROTEIN_ID = uniprot|Q13029|PRDM2_HUMAN
NUMBER_OF_FEATURES_FOUND=16

DOMAIN=Pfam:SET
START=22
END=147
EVALUE=1.1e-07
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=SET
START=28
END=147
EVALUE=5.75208992528071e-23
TYPE=SMART
STATUS=visible|OK

DOMAIN=coiled_coil_region
START=253
END=296
EVALUE=0
TYPE=INTRINSIC
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=360
END=382
EVALUE=0.00275221664717456
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=360
END=382
EVALUE=0.00054
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=390
END=412
EVALUE=0.00181578582533093
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=390
END=412
EVALUE=0.00022
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=483
END=506
EVALUE=0.00417158034561285
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=483
END=506
EVALUE=0.0015
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1134
END=1156
EVALUE=0.153340322702918
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=1162
END=1185
EVALUE=0.266980907371989
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=1191
END=1214
EVALUE=0.0471960371502188
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1191
END=1214
EVALUE=0.0083
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=1333
END=1353
EVALUE=79.6985586079286
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=1455
END=1475
EVALUE=18.1151288768658
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=1455
END=1478
EVALUE=0.054
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000057657|ENST00000369089
SMART_PROTEIN_ID = uniprot|Q86WM7|Q86WM7_HUMAN
NUMBER_OF_FEATURES_FOUND=10

DOMAIN=SET
START=2
END=73
EVALUE=0.648884521082365
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=441
END=463
EVALUE=0.000641977238187666
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=441
END=463
EVALUE=1.9e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=469
END=491
EVALUE=0.00389222209314515
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=469
END=491
EVALUE=0.0002
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=497
END=519
EVALUE=0.00726314316132557
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=497
END=519
EVALUE=0.00012
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=525
END=547
EVALUE=0.0135535040925657
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=525
END=547
EVALUE=0.0087
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=553
END=573
EVALUE=127.236563561911
TYPE=SMART
STATUS=visible|OK

-- FINISHED --
-- SMART RESULTS TEXTFORMAT --
USER_PROTEIN_ID = ENSG00000130711|ENST00000253008
SMART_PROTEIN_ID = uniprot|Q9H4Q4|PRD12_HUMAN
NUMBER_OF_FEATURES_FOUND=7

DOMAIN=SET
START=86
END=209
EVALUE=0.000100517895933835
TYPE=SMART
STATUS=visible|OK

DOMAIN=ZnF_C2H2
START=243
END=265
EVALUE=0.00550443324077618
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=243
END=265
EVALUE=7.7e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=271
END=293
EVALUE=0.00181578582533093
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=271
END=293
EVALUE=7e-05
TYPE=PFAM
STATUS=hidden|overlap

DOMAIN=ZnF_C2H2
START=299
END=323
EVALUE=0.216855918058524
TYPE=SMART
STATUS=visible|OK

DOMAIN=Pfam:zf-C2H2
START=299
END=323
EVALUE=0.009
TYPE=PFAM
STATUS=hidden|overlap

-- FINISHED --

"""        
        
    from simplejson import dumps
    prot_domains = parse_smart_output(test_data.split("\n"))
    for prot in prot_domains:
        if prot == "_NO_MATCH":
            continue
        if "SET" not in prot_domains[prot]:
            continue
        if len(prot_domains[prot]['SET']) != 1:
            print "!!"
        set_domain = prot_domains[prot]['SET'][0]
        print prot, set_domain["START"], set_domain["END"]
    #print dumps(prot_domains, indent = 4, sort_keys = True)
